<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>调试女友相册</title>
  <style>
    ol,
    ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    body {
      padding: 0;
      margin: 0;

    }
    .content {
      width: 100vw;
      height: 100vh;
      position: relative;
      overflow: hidden;
    }

    #cube {
      height: 200px;
      width: 200px;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      perspective: 1000px;

    }

    #cube ul {
      height: 200px;
      width: 200px;
      position: absolute;
      top: 0;
      left: 0;

      animation: rotate1 12s linear reverse infinite;
      transform-style: preserve-3d;
      transform-origin: center center 0;

    }

    #cube ul li {
      width: 100%;
      height: 100%;
      position: absolute;
      transition: all 2s;
    }

    #cube ul li img {
      width: 100%;
      height: 100%;
    }

    /* 第一张 正前方 */
    #cube ul li:nth-child(1) {
      left: 0;
      top: 0;
      transform: translateZ(150px);
    }

    /* 第二张 右边那张照片 */
    #cube ul li:nth-child(2) {
      left: 150px;
      top: 0;
      transform-origin: center;
      /* y轴 旋转90度 */
      transform: rotateY(90deg);
      /* opacity: .4; */
    }

    /* 第三张 后面图片 */
    #cube ul li:nth-child(3) {
      left: 0;
      top: 0;
      /* z轴  */
      transform: translateZ(-150px);
    }

    /* 第四张 左边那张照片 */
    #cube ul li:nth-child(4) {
      left: -150px;
      top: 0;
      transform-origin: center;
      /* y轴 旋转90度 */
      transform: rotateY(90deg);
    }

    /* 第五张 上面图片 */
    #cube ul li:nth-child(5) {
      left: 0;
      top: -150px;
      /* X轴 旋转90度 */
      transform: rotateX(90deg);
    }

    /* 第六张 底部图片 */
    #cube ul li:nth-child(6) {
      left: 0;
      top: 150px;
      /* X轴 旋转90度 */
      transform: rotateX(90deg);
    }


    @keyframes rotate1 {
      0% {
        transform: rotateY(0);
      }

      45% {
        transform: rotateY(360deg);
      }

      55% {
        transform: rotateX(0deg);
      }

      100% {
        transform: rotateX(360deg);
      }
    }
  </style>
</head>

<body>
  <div class="content">

    <canvas id="canvas" width="662" height="728"></canvas>

    <div id="cube">
      <ul>
        <li>
          <img src="images/1.jpg">
        </li>
        <li>
          <img src="images/2.jpg">
        </li>
        <li>
          <img src="images/3.jpg">
        </li>
        <li>
          <img src="images/4.jpg">
        </li>
        <li>
          <img src="images/5.jpg">
        </li>
        <li>
          <img src="images/6.jpg">
        </li>
      </ul>

    </div>
  </div>

</body>

<script src="js/draw.js"></script>

</html>